package com.wontube.smr.remote.admin;

import java.util.List;

import com.wontube.core.annotation.NoLoginSupport;
import com.wontube.core.pub.servlet.handlers.BasicHandler;
import com.wontube.smr.client.model.po.Genre;
import com.wontube.smr.dao.bo.GenreSelectDao;
import com.wontube.smr.web.client.admin.IAdminGenreHandler;

@NoLoginSupport
public class AdminGenreHandler extends BasicHandler implements IAdminGenreHandler {

	@Override
	public List<String> listGenreCategorys() {
		return GenreSelectDao.listGenreCategorys();
	}

	@Override
	public List<Genre> selectAllGenre() {
		return GenreSelectDao.selectAllGenres();
	}

	@Override
	public List<Genre> selectGenreByCategory(String category) {
		return GenreSelectDao.selectGenresByCategory(category);
	}

	@Override
	public boolean deleteGenreByID(String id) {
		return GenreSelectDao.deleteGenre(id);
	}
	
	@Override
	public boolean updateGenre(Genre genre) {
		return GenreSelectDao.saveOrUpdateGenre(genre);
	}
	
	

	@Override
	public Genre getGenreByID(String id) {
		return GenreSelectDao.getGenreByPK(id);
	}

	@Override
	public boolean addGenre(Genre genre) {
		return GenreSelectDao.addGenre(genre);
	}
}
